<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('试卷编号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input class="form-control" name="row[id]" readonly type="text" value="{$row.id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('试卷名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('关联课程')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-course_id" data-rule="required" min="0" data-source="course/index" class="form-control selectpage" name="row[course_id]" type="text" value="{$row.course_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('关联分类')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-category_id" data-rule="required" min="0" data-source="coursequestioncategory/index"  class="form-control selectpage" {$categoryParams}  name="row[category_id]" type="text" value="{$row.category_id|htmlentities}">
        </div>
    </div>
    <div class="form-group" style="display: none;">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否免费')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-is_free" name="row[is_free]" type="hidden" value="{$row.is_free|htmlentities}">
            <a href="javascript:;" data-toggle="switcher" class="btn-switcher" data-input-id="c-is_free" data-yes="1" data-no="0">
                <i class="fa fa-toggle-on text-success {eq name="$row.is_free" value="0"}fa-flip-horizontal text-gray{/eq} fa-2x"></i>
            </a>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('会员专属')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_radios('row[is_need_vip]', ['1'=>__('是'), '0'=>__('否')],$row.is_need_vip)}
            <span class="help-block text-muted"><i class="fa fa-info-circle"></i> 选择"是"表示只有开通会员或开通题库的用户才能查看此分类</span>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('积分价格')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-integral_price" data-rule="required" min="0" class="form-control" name="row[integral_price]" type="number" value="{$row.integral_price|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('试卷排序')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sort" class="form-control" name="row[sort]" type="number" min="0" value="{$row.sort|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
